﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GalaSoft.MvvmLight;

namespace MVVMMaker.Model
{
    public class Command : ObservableObject
    {
        // Fields...
        private IEnumerable<Parameter> _Parameters;
        private bool _HaveParameter;
        private Method _CanExecute;
        private Method _Execute;
        private string _Name;


        public string Name
        {
            get { return _Name; }
            set
            {
                if (_Name == value)
                    return;
                _Name = value;
                RaisePropertyChanged("Name");
            }
        }
        
        public Method Execute
        {
            get { return _Execute; }
            set
            {
                if (_Execute == value)
                    return;
                _Execute = value;
                RaisePropertyChanged("Execute");
            }
        }


        public Method CanExecute
        {
            get { return _CanExecute; }
            set
            {
                if (_CanExecute == value)
                    return;
                _CanExecute = value;
                RaisePropertyChanged("CanExecute");
            }
        }

        public bool HaveParameter
        {
            get { return _HaveParameter; }
            set
            {
                if (_HaveParameter == value)
                    return;
                _HaveParameter = value;
                RaisePropertyChanged("HaveParameter");
            }
        }        

        public IEnumerable<Parameter> Parameters
        {
            get { return _Parameters; }
            set
            {
                if (_Parameters == value)
                    return;
                _Parameters = value;
                RaisePropertyChanged("Parameters");
            }
        }
        
        
    }
}
